HTMLify
style.css
Views: 13 | Author: huxn-webdev
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | * { padding: 0; margin: 0; box-sizing: border-box; } body { width: 100%; height: 100vh; display: flex; justify-content: center; align-items: center; background: linear-gradient(#8bc6ec, #9599e2); font-family: sans-serif; } #container { position: relative; padding: 7px; font-size: 25px; font-weight: bold; cursor: pointer; } #tooltip-content { position: absolute; left: 50%; top: 0; transform: translateX(-50%); background: #000; color: #fff; white-space: nowrap; padding: 10px 15px; border-radius: 7px; visibility: hidden; opacity: 0; transition: opacity 0.5s ease; } #tooltip-content::before { content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 15px solid; border-color: #000 #0000 #0000 #0000; } #container:hover #tooltip-content { top: -130%; visibility: visible; opacity: 1; } |